package com.jredu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jredu.dao.UserDao;
import com.jredu.dao.impl.UserDaoImpl;
import com.jredu.entity.User;
import com.jredu.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	@Resource(name="userDao")
	private UserDao userDao;
	
	@Override
	public User login(String name, String pwd) {
		return userDao.login(name, pwd);
	}

	@Override
	public List<User> findUsers() {
		return userDao.findUsers();
	}

	@Override
	public User findUserById(Integer id) {
		return userDao.findUserById(id);
	}
}
